<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>附件插件</title>
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css" />
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/dtree.css"/>
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/font/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="${s.base}/css/base/darkBlue.css"/>
	</head>
	<body class="wrap-container clearfix">
		<div class="column-content-detail padt10" id="tool">
			<div class="cy-table-item-title">
				<div class="cy-button-ctn"></div>
				附件案例
			</div>

			<div class="layui-form-item mart20">
				<label class="layui-form-label w90">单图片操作：</label>
				<!--单图片开始-->
				<div class="layui-input-block cy-uploadpic-ctn" id="headLogoUpload" style=" float:left;margin-left:0!important;position:relative;">

				</div>
				<!--单图片结束-->
			</div>

			<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<!--弹窗式单附件开始-->
					<button type="button" class="layui-btn layui-btn-normal layui-btn-mid marb5" id="demo1">弹窗式单附件</button>
					<!--弹窗式单附件结束-->
				</div>
			</div>
			<div class="dashed"></div>
			<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<!--上传附件列表开始-->
					<div class="layui-upload" id="objectId">

					</div>
					<!--上传附件列表结束-->
				</div>
			</div>
			<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<!--上传附件列表开始-->
					<div class="layui-upload" id="objectShow">

					</div>
					<!--上传附件列表结束-->
				</div>
			</div>
			<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<!--KnifeZ富文本开始-->
					<div class="layui-upload">
						<textarea id="layeditDemo"></textarea>
					</div>
					<!--KnifeZ富文本结束-->
				</div>
			</div>
		</div>
	<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="${s.base}/lib/KnifeZ/ace/ace.js" type="text/javascript" charset="utf-8"></script>
		<script>
            layui.use(['jquery','fileUtil','dialog','layer','layedit','baseutil'], function() {
                var $ = layui.jquery,
                    fileUtil = layui.fileUtil,
                    baseutil = layui.baseutil,
                    layer = layui.layer,
                    layedit = layui.layedit,
                    dialog = layui.dialog;
                //弹窗式单附件
                $("#demo1").bind("click",function () {
                    fileUtil.singleFileUpload('',function (result) {
                        dialog.msg(result);
						debugger
                    });
                });

                //单图片上传
                fileUtil.uploadImage('headLogoUpload',"sys/user","155203689356407875758");
                //单图片上传
                //fileUtil.uploadImage('#headLogo',{catalog: "sys/user",objectId:""},"headLogo");
                //多附件上传
                fileUtil.uploadMultiFile('objectId',"sys/mult",'');
                //多附件展示
                fileUtil.uploadMultiFileShow('objectShow','155203689356407875758');
                //KnifeZ富文本
                baseutil.layeditKnifezBuild("layeditDemo",300);
            });
		</script>
	</body>
</html>